home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1995 July & August / cd No4 joystick No62.iso / pc / cadeaux / df / doc / levmap.doc < prev    next >
Encoding:
Text File  |  1995-06-01  |  34.4 KB  |  824 lines

  1. +==================================+
  2. | Dark Forces UtilitieS and Editor |
  3. +==================================+
  4.  
  5. LEVMAP.EXE : multilayered level geometry and objects editor.
  6.  
  7. Author   : Yves  BORCKMANS  (yborckmans@abcomp.be (work))
  8.            (Please state the package version when you email me)
  9. Thanks to: Serge DEBROEYER
  10.               for beta testing of the level editor, for A LOT of very
  11.               useful ideas and tips, and for making a huge demo level.
  12.  
  13.  
  14. Welcome to the centerpiece of DFUSE: the level editor.
  15.  
  16. You should also read the df_specs.doc and the levkeys.doc files.
  17. Notes: * you may access this file at any time in the level editor by hitting
  18.          Ctl+F1.
  19.        * search on the [NEW] keyword to see what's new since release 0.91
  20.        * also check the history.doc file.
  21.  
  22. +-------------------+
  23. | TABLE of CONTENTS |
  24. +-------------------+
  25.  
  26.  O.    OVERVIEW
  27.  I.    BASICS
  28.        1. Layout of the screen
  29.        2. Moving around and zooming
  30.        3. Changing mode
  31.        4. Selecting things
  32.        5. Changing layers
  33.  II.   MOVING THINGS - THE GRID
  34.  III.  ADDING THINGS
  35.        1. Adding sectors
  36.        2. Adding walls
  37.        3. Adding objects
  38.  IV.   DELETING THINGS
  39.        1. Deleting sectors
  40.        2. Deleting walls
  41.        3. Deleting objects
  42.  V.    ADJOIN/MIRROR/WALK
  43.        1. Adjoin/unadjoin
  44.        2. Selecting the adjoin of a wall
  45.        3. Flipping a wall
  46.  VI.   EDITING THINGS
  47.        1. Normal text edit
  48.        2. Flags
  49.        3. Object sequences
  50.        4. Textures and object pickers
  51.  VII.  SAVING THE LEVEL - NEW LEVEL - LEAVING LEVMAP
  52.        1. Saving
  53.        2. Creating a new level
  54.        3. Quitting LEVMAP
  55.  IX.   GOODIES
  56.        1. DOS Shell
  57.        2. Edit the .INF and .GOL files
  58.        3. Allocated things and free memory
  59.        4. Consistency checks
  60.        5. Automatic texture stitching - altitudes and light distribution
  61.        6. Deformations [NEW]
  62.        7. Polygons [NEW]
  63.   X.   MISCELLANEOUS REMARKS
  64.  
  65.  
  66.  O.    OVERVIEW
  67.        ========
  68.  
  69. LEVMAP will permit you to:
  70.  * load a Dark Forces level
  71.  * make any modifications to - its geometry
  72.                              - its texturing (ie its look)
  73.                              - its objects
  74.  * save the modified level
  75.  
  76. In addition to this, you will be able to edit the .INF and .GOL files as text,
  77. shell out to DOS, ...
  78.  
  79.  
  80.  
  81.  I.    BASICS
  82.        ======
  83.  
  84. [NEW] Please note that when I use the word 'thing', I mean sector, wall, vertex
  85. or object. This isn't to be confused with DOOM THINGS which are only objects.
  86.  
  87. 1. Layout of the screen
  88.    --------------------
  89.  
  90. The top of it is divided in two panes. The left one is again divided, the top
  91. showing general information such as the level name, the mode, the layer, grid
  92. and scale values. The bottom presents information about the currently selected
  93. thing, focusing on its dependencies (ie If it is a wall: which sector does it
  94. belong to? What are its left and right vertices?).
  95.  
  96. [NEW] You will also find there if it is a trigger, and possibly its FIRST
  97. client.
  98.  
  99. The right pane displays more specific information about the thing, and also
  100. serves to edit it.
  101. [NEW] If the object is an elevator, its FIRST class will be shown.
  102.  
  103. All the rest of the screen is filled by the map of the level. In the lower left
  104. corner, you'll also find the current position of the pointer, a reminder of the
  105. editing mode, and the number of 'multiselected' objects.
  106.  
  107. 2. Moving around and zooming
  108.    -------------------------
  109.  
  110. When you begin a LEVMAP session, the map will be centered on the screen, and
  111. displayed at a 1:1 scale. However, this isn't by far the best way to work on it.
  112. You will need to be able to scroll the display to the point that interest you,
  113. and then zoom in to make details visible.
  114.  
  115. Use the cursor keys to move the screen.
  116. [NEW] The cursor keys are also emulated with the mouse. Just put the pointer
  117. completely against the side of the screen, then click (and optionally hold)
  118. the LEFT mouse button to scroll the screen.
  119. Note that if you don't find this natural and would like to invert the movements
  120. and move the map instead, type Alt+R for reverse.
  121.  
  122. To zoom, use the '+' and '-' keys.
  123.  
  124. Notice how the coordinates are updated, and how the scale changes in the
  125. top/left pane. Two more keys: '/' will recenter the map, and '*' will reset the
  126. scale back to 1.
  127.  
  128. To quickly setup to edit something, point to it and press the 'c' key. This
  129. will center the screen on the cursor AND zoom * 4.
  130.  
  131. 3. Changing mode
  132.    -------------
  133.  
  134. At startup, the editing mode will be SECTORS [S]. You can change to VERTICES by
  135. pressing [V], to WALLS with [W], and to OBJECTS by hitting [O]. Try them all,
  136. and notice how the panes and the map change.
  137. [NEW] See how elevators, triggers and secrets are colored.
  138. Notice how the selected wall shows to which sector it belongs by drawing a
  139. perpendicular in its direction. Also note how the selected object's orientation
  140. is represented, and how objects are differentiated by shapes and colors. [NEW]
  141.  
  142. A quick note for DEU users: you can also use [L] for walls, and [T] for objects.
  143.  
  144. 4. Selecting things
  145.    ----------------
  146.  
  147. Change back to OBJECTS [O]. Move the mouse pointer near one of them, and click
  148. the left mouse button. The object becomes selected.
  149.  
  150. [NEW]
  151. Change to SECTORS, try the same on a few sectors. Notice how you cannot select
  152. 'outside' of all the sectors, or 'inside' a sector gap.
  153.  
  154. Important: there is a problem when two sectors overlap ON THE SAME LAYER !
  155. You simply have to change the layer of one of the sectors to avoid problems in
  156. SC and WL selection, and also in objects layering.
  157.  
  158. [NEW]
  159. Change to WALLS and select a few walls. Notice how clicking on both sides of
  160. adjoined walls selects one or the other.
  161.  
  162. Then switch to VERTICES. Remember that there are very often two vertices at the
  163. same place. If you don't seem to be able to select the one you want, try to hold
  164. down the Control key when clicking with the left button. This will in effect
  165. select the 'next nearest' vertex, and is quite useful.
  166.  
  167. You may also use the keyboard to select things. In SECTOR or OBJECT modes, the
  168. 'N' and 'P' keys will respectively select the next and previous SC/OB. In
  169. VERTEX or WALL modes, they will select the next and previous VX/WL, but cycling
  170. INSIDE the sector.
  171.  
  172. In sector mode, you have yet another possibility: if a sector has a name, you
  173. may press the 'F' key to obtain a sorted picklist of the sector names.
  174. The same key, but in wall mode, will select the adjoin of a wall.
  175. [NEW] In object mode, 'F' will select the PLAYER start position.
  176.  
  177. [NEW] Also in object mode, you may elect to show only the difficulty level
  178. you want to see by using the '1', '2' and '3' keys respectively for EASY,
  179. MED and HARD. The '0' (zero) key will restore the display to ALL objects.
  180. Note that you won't be able to select hidden objects.
  181.  
  182. There is another kind of selection: the MULTIPLE selection. This will allow you
  183. to perform some operations on many things at the same time. You may either
  184. hold the Shift key while selecting, or make a normal selection (including with
  185. the keyboard or with the Control key) and add it to the multiple selection by
  186. pressing the SPACEBAR. Note the different color for the selected things, the
  187. color change in the upper left pane, and the number of multiselected things
  188. that appears next to the mouse position.
  189. Also note that some texturing multi operations require you to select things
  190. IN A CERTAIN ORDER.
  191.  
  192. If you multiselect one or more sectors and switch to WALL or VERTICES modes,
  193. the multiselection is converted to a wall or vertices multiselection.
  194. Idem if you multiselect walls and switch to VERTICES mode.
  195. Note that the reverse is NOT true.
  196.  
  197. To clear a multiselection, use the BACKSPACE key.
  198.  
  199. 5. Changing layers
  200.    ---------------
  201.  
  202. You may have noticed that some lines seem to be 'shadowed'. These are in fact
  203. on other layers. Imagine that the level is drawn on stacked transparent plastic
  204. sheets, and that one of them is hilighted. You can change the current layer by
  205. using the 'Page Up' and 'Page Down' keys. You can toggle the shadow on and off
  206. by hitting the Alt + S key combination.
  207.  
  208. [NEW] Objects also have been given layer information, and they are drawn
  209. accordingly. Objects that couldn't be associated with a sector are drawn on all
  210. layers. The Alt + O key combo will toggle the use of object layering. It is also
  211. useful to do a double Alt + O toggle from times to times, because object layers
  212. are only updated when the OBJECT is modified, and not when the sectors, walls or
  213. vertices are modified (moving a wall could pass an object outside, or in another
  214. sector, ...) as this would be MUCH too long to check.
  215. Note that making the OB -> SC link is a lenghty operation in big levels, but as
  216. it is the default option, LEVMAP will do it a load time.
  217. So, if you are currently working only on the geometry, you may want to disable
  218. object layering in DFUSE.INI: simply set OBLAYER=0 in the [LEVMAP-OPTIONS]
  219. section.
  220.  
  221. Also notice that if multiple keys are in the buffer, LEVMAP will stop
  222. drawing the shadow (and the grid) to gain some time. The last key will draw it
  223. correctly except if you enter an editor but this isn't really a big issue. The
  224. current layer is always drawn correctly.
  225.  
  226. So, if you haven't done it yet, go and take a look at it. From DFUSE main menu,
  227. select [L]evel [C]hoose, select the level you want, then choose [M]ap.
  228. Try moving the map, zoom and unzoom it, center it, change the current layer,
  229. then try changing modes and selecting some objects.
  230.  
  231.  
  232.  II.   MOVING THINGS - THE GRID
  233.        ========================
  234.  
  235. Once you have selected something, the most frequent operation is to move it.
  236. This is done with the RIGHT mouse button. For instance, select an object, then
  237. move the pointer, and press the right mouse button: the object moves to the
  238. pointer position. Note that this is 'point and click', not 'drag and drop'.
  239.  
  240. Often, you have to move a vertex and place it exactly on another vertex. To do
  241. this, hold down the ALT key while right clicking. The vertex will be moved
  242. right on top of the one nearest to the pointer. This has been implemented to
  243. help move the vertices of adjoined walls.
  244. I could have moved the vertices together, but you would have lost the chance to
  245. "move a vertex and see what's under" (I really don't know how to explain this,
  246. I just know I do it when I'm a bit lost in a 'knot' of vertices !).
  247.  
  248. When you move a wall or a sector, everything happens as if you moved its first
  249. vertex (the one that is bigger). All the other vertices undergo exactly the
  250. same displacement. Note that the ALT key trick also works for the walls and
  251. sectors, and that the adjoins are ALSO moved.
  252.  
  253. A grid has also been implemented. It will help you position the things you move
  254. more efficiently. To activate it, press Alt + G. Notice the dots that appear on
  255. the screen. They mark the grid positions. If you now move something, it will
  256. 'SNAP' to the nearest grid position. You can decrease or increase the grid size
  257. with the 'g' and 'G' keys. To get rid of it, press the Alt + G key again.
  258.  
  259. Note that the ALT key 'drop-on-a-vertex' function will continue to function
  260. correctly, even with the grid on.
  261.  
  262. When you have made a multiselection, you move the 'bigger' vertex (which is
  263. vertex 0 of the current sector or wall, or the current vertex), and all the
  264. others follow.
  265.  
  266. Again, try to move a few things, with and without the grid. Change the grid
  267. settings.
  268.  
  269.  
  270.  III.  ADDING THINGS
  271.        =============
  272.  
  273. Please note - and this is true in all the modes - that LEVMAP does NEVER
  274. create a thing, it ALWAYS works by duplicating something that already exists.
  275.  
  276. As you will always start a new level either by modifying an existing one, or by
  277. using newlevl!.exe, this will never be a problem, because you'll always have
  278. at least one sector and one object.
  279.  
  280. That may seem strange, but it has many advantages. The first of which is that
  281. you construct levels logically, so if you have set settings for a sector and
  282. its walls, a copy will inherit them all. The second advantage is that you can
  283. copy a very complex sector and duplicate it elsewhere. 
  284.  
  285. [NEW] The only 'exception' to this is the POLYGON goodie (see).
  286.  
  287. 1. Adding sectors
  288.    --------------
  289.  
  290. This is quite easy: select the sector you want to copy, then move the cursor
  291. to where you want the duplicate, and press the 'Insert' key. And hey presto,
  292. another sector. Note how it has exactly the same settings as its ancestor.
  293. Also note that this sector is completely independent and one of its walls will
  294. need to be connected (adjoined) to a wall of an other existing sector.
  295.  
  296. [NEW] This also works in multiselection, with just one slight modification:
  297. here the relations between the selected sectors are preserved (adjoins), but
  298. the links to sectors OUTSIDE the multiselection are severed. Note that you will
  299. probably still have to edit the sector names, and the .INF file.
  300. During that time, the color representation will possibly be wrong, but I prefer
  301. to leave it that way, because it gives a visual feedback of things to change.
  302. You will be asked if you want to transfer the selection: this means set the
  303. multiselection to the copy instead of the original sectors and is quite useful,
  304. as you'll probably want to rotate it, or move it more precisely in place.
  305.  
  306. There is another way to create a sector, and it is done at the wall level.
  307. It is called 'extruding' a wall, and will create another sector,
  308. AND adjoin/mirror it to the selected wall. This is done by pressing the 'E' key.
  309. This new sector has the sector settings of the sector to which belong the
  310. extruded wall, and its walls have the caracteristics of the extruded wall.
  311. Also note that it is created orthogonally to the extruded wall, the
  312. perpendiculars having just one quarter of the extruded wall lenght.
  313.  
  314. BIG HINT: this is a very quick way to construct doors and stairs.
  315.  
  316. A third thing concerning sectors: you may create a 'gap' in a sector by
  317. selecting it, positionning the mouse cursor somewhere inside and pressing the
  318. 'Alt + Insert' keys. This is the base of inserting a sector inside another one.
  319. You just have to use the first method to create a new sector, set it in place,
  320. and adjoin the walls !
  321.  
  322. 2. Adding walls
  323.    ------------
  324.  
  325. As we have seen just above, a wall may be extruded to create a new sector.
  326. There is another operation that needs to be done on a wall: splitting it.
  327. The 'Insert' key will do just that. The wall will be 'cut' in half, in effect
  328. creating a new wall (and a new vertex).
  329.  
  330. Splitting adjoined wall is supported, also splitting the adjoined wall, and
  331. reestablishing the links. This is a bit slow (around 2 or 3 secs), as it forces
  332. two hard disk 'insert' operations on the walls swap file which is generally
  333. quite big (you have to pay somewhere for the direct access !).
  334.  
  335. Please note that splitting multiple walls still isn't supported (and seeing the
  336. time the preceeding one takes, I don't know if it will ever be !)
  337. Also note that there is no vertex insertion, because the wall insertion does
  338. it !
  339.  
  340. 3. Adding objects
  341.    --------------
  342.  
  343. This is the easiest addition: select an object, move the cursor and press the
  344. 'Insert' key to get a copy. Note that you may have to change its altitude.
  345.  
  346. [NEW] This also works in multiselection.
  347. You will be asked if you want to transfer the selection: this means set the
  348. multiselection to the copy instead of the original objects.
  349.  
  350.  
  351.  IV.   DELETING THINGS
  352.        ===============
  353.  
  354. 1. Deleting sectors
  355.    ----------------
  356.  
  357. Just select the sector an press the 'Delete' key. Notice that the sector doesn't
  358. disappear, but that its color changes. This is because the sector can be
  359. UNDELETED (by pressing the Alt + Del key combo). This may be done until you
  360. quit the editor OR you use the 'save and reload' function. Also note that the
  361. walls of the deleted sector AREN'T unadjoined/unmirrored so that you can also
  362. use the undelete function as a quick UNDO.
  363.  
  364. 2. Deleting walls
  365.    --------------
  366.  
  367. Again, select the wall and press 'Delete'. Be careful, as there is NO undelete
  368. for the walls. Notice how the other walls are affected, and how a vertex is
  369. also deleted. Also note that there is no vertex deletion, as the wall deletion
  370. does it. Try to get a feel of which wall to delete, as it is a little confusing
  371. at the beginning.
  372.  
  373. 3. Deleting objects
  374.    ----------------
  375.  
  376. The simplest of all: you can use 'Delete' and Alt + Del.
  377.  
  378.  
  379.  V.    ADJOIN/MIRROR/WALK
  380.        ==================
  381.  
  382. 1. Adjoin/unadjoin
  383.    ---------------
  384.  
  385. If you select a wall and press the 'A' key, the editor will search for an
  386. adjoin/mirror to that wall, and if it finds one, will do all the modifications
  387. to the adjoin, mirror and walk fields for you. Note that this will also work
  388. in a multiselection.
  389.  
  390. On the opposite, you can UNadjoin a pair of walls by selecting one of them and
  391. pressing the Alt + A keys. This also works in a multiselection.
  392.  
  393. 2. Selecting the adjoin of a wall
  394.    ------------------------------
  395.  
  396. This is very useful in many cases. All you have to do is press the 'F' key.
  397.  
  398. 3. Flipping a wall
  399.    ---------------
  400.  
  401. Flipping a wall will swap its start and end vertices. Be careful with this, as
  402. a wrongly oriented wall in a sector will give you a 'Hall of Mirrors' effect,
  403. which DOOM level creators know very well. You should try it voluntarily once,
  404. just so that you know and can recognize HOMs.
  405.  
  406. [NEW] Warning: it seems that some game engine quirks also give HOM like effects,
  407. with complicated non-convex and imbricated sectors, but also simply if the
  408. area is too big (> 250 units). So don't get confused !
  409.  
  410. So, why is flipping useful ? Well, there is a very specific case in which this
  411. option may win you a lot of time. This is a little difficult to follow, so
  412. don't hesitate to come back to it later.
  413.  
  414. Imagine you have a sector into which you must insert a very complicated other
  415. sector. Normally, the technique would be to insert one or more gaps (Alt + Ins),
  416. split the walls of the gaps and put their vertices into place, then copy one or
  417. more sectors, split their walls, put their vertices into place, and finally
  418. select all the walls that need to be adjoined, and press the 'A' key.
  419.  
  420. This works perfectly well, but did you notice that exactly the same things were
  421. done twice ?
  422. So, here is a much faster solution (taking about half the time).
  423.  
  424. Construct your first sector as you like it, inserting the gaps, and so on.
  425. Then copy THAT one, and put it on a free space on your map for now. Quickly
  426. switch to WALLS mode. The first wall is selected. Delete it and delete all the
  427. 'exterior' walls, so that you stay with all the 'gaps'. Now, you could copy
  428. them in place, and adjoin the walls. WRONG ! Because the walls have exactly the
  429. same orientation as the original ones, and mirrors must be 'piggy back'.
  430. Switch back to SECTORS, press the spacebar to multiselect, then switch back to
  431. WALLS. Press Alt + F to flip all the selected walls! Now, all you have to do is
  432. to move all these walls into place (take note of the 'big' vertex position, and
  433. use the Alt + right mouse trick). Once they are, just press the 'A' key to
  434. create all the adjoins/mirrors.
  435.  
  436. OK, it seems much longer in text, but believe me it is actually much faster on
  437. complicated interior sectors than the first method.
  438.  
  439.  
  440. - So, we know all we need about modifying the level geometry, except one thing:
  441.   "How to set the altitudes ?"
  442.  
  443. - To answer this and a lot of other things as well (life, the universe, ...),
  444.   it is time to introduce ... the EDITORS !
  445.  
  446.  
  447.  VI.   EDITING THINGS
  448.        ==============
  449.  
  450. There are five editors in LEVMAP: for SECTORS, WALLS, VERTICES, OBJECTS, and
  451. for the general level information (level name, palette, ...).
  452.  
  453. The first four of them will work with multiselection, and will use the
  454. right pane to edit (see the specs for an explanation of all the fields).
  455.  
  456. Note that you can access them two different ways:
  457.  - if you press the ENTER key, you'll edit the selected thing
  458.  - if you press Alt + ENTER and you have a multisel, you'll edit ALL the things
  459.  
  460. The first field of the pane will be hilited (note that if you selected a
  461. multiple edit with Alt+ENTER all the LABELS will also be hilited).
  462. You can now use the cursor keys to move that hilite, and the ENTER key to edit
  463. the current field. Press the Esc key to leave the editor.
  464.  
  465. You can also press the 'c' or 'C' key to change the current picklist file
  466. for textures when in SECTOR or WALL editing modes.
  467. Note that you'll have to create new textXXXX.dfu files in DFUDATA and update
  468. textures.dfu to use this feature. So, you'll be able to dynamically select
  469. picklists which you created with your own selection and sorting.
  470.  
  471. [NEW]
  472. You can press the 's' or 'S' key to automatically generate sequences for the
  473. current object when in OBJECT editor mode. You can also use the 'g' or 'G' key
  474. to transform the current object into a generator.
  475.  
  476. If different LOGICs may be associated with the chosen object, the editor will
  477. insert all of them, and signal it to you with a 'Choose LOGIC !' message next
  478. to the Seq field. When you create a generator, you will get the
  479. 'Edit GENERATOR !' message to remind you it has default settings.
  480.  
  481. Important: these operations do affect ONLY the current object, EVEN if you
  482. are editing a multisel with Alt + ENTER.
  483. To propagate the changes, you must edit the 'Seq' field.
  484.  
  485.  
  486. There are four possible types of fields:
  487.  
  488. 1. Normal text edit
  489.    ----------------
  490.  
  491. These are classic edit fields. You start with the previous content, and edit by
  492. using Delete, Backspace, the cursor keys, Home, End and so on. Press Enter to
  493. accept changes, or Esc to get the original value back.
  494.  
  495. 2. Flags
  496.    -----
  497.  
  498. The flags will show as a list of bits you can select or deselect at will with
  499. the Spacebar. Press ENTER to accept changes. LEVMAP now fully supports the 20
  500. bits of SC FLAG 1.
  501.  
  502. Important: when editing the flags in multiple selection, you are NOT copying
  503.            the final flag value across the multiple selection, as is the case
  504.            for all the other fields. What happens is that you propagate the
  505.            changes made. Suppose you set the bit 2, all the bits 2 will be set,
  506.            but the other bits are left alone.
  507.  
  508. 3. Object sequences
  509.    ----------------
  510.  
  511. The .O file contains data for the objects that is very variable and delimited
  512. in the file by the SEQ and ENDSEQ keywords. The 'Seq' label shows the number
  513. of lines between SEQ and ENDSEQ. When it is current and you try to edit it,
  514. your text editor will open up, with SEQ, ENDSEQ and all the lines between.
  515. Edit it as you like, but watch the comments on the first and last lines which
  516. will tell you how much lines/columns you may enter.
  517. When you have finished editing, save and exit from your text editor.
  518.  
  519. Note: remember the automatic sequences !
  520.  
  521. 4. Textures and object pickers
  522.    ---------------------------
  523.  
  524. It would be tedious to type texture or object names, so when you edit them,
  525. a list of values appears, as well as a graphical view. Note that you don't
  526. need to wait while the images are being drawn to move in the list.
  527. You can use the Up, Down, Page Up, PageDown, Home and End keys to move.
  528. Pressing ENTER will accept your choice, and ESC will cancel.
  529.  
  530. Warning: if you press ESC while selecting a texture for a SIGN, its value
  531.          will be set to [none].
  532.  
  533. Please note that the textures sizes are in the map 'scale' you have to multiply
  534. them by 8 to get the size of the image in pixels.
  535.  
  536. [NEW] Remember you can change the picklist with the 'c' or 'C' keys.
  537.  
  538. If you edit the OBJECT Class, a small list of values will also appear, and if
  539. you change the Class you will immediately jump into the list of values for
  540. that Class.
  541.  
  542.  
  543. The fifth (and less used) editor is still in a text mode 'beta' presentation,
  544. you can access it by pressing the 'M' key. Also note that the editing is very
  545. bad (a simple cscanf) and you cannot backspace, and so on. It allows you to
  546. alter the level name, both in the LEV and O files, the music file, the palette,
  547. and so on. Note that this data may be irrelevant (see the specs).
  548. The author information and map comments should be set in DFUSE.INI instead, as
  549. cscanf won't accept whitespace between words.
  550.  
  551.  
  552.  VII.  SAVING THE LEVEL - NEW LEVEL - LEAVING LEVMAP
  553.        =============================================
  554.  
  555. 1. Saving
  556.    ------
  557.  
  558. Saving the level is easy: just press the 'F2' key. The screen will switch to
  559. text mode to show the progress of the save, then come back to graphics. If it
  560. is the first time you save in a session, a backup will also be done in the
  561. BACKUPS directory.
  562.  
  563. An alternative is to use the 'F3' key, which will save AND RELOAD the level.
  564. This will have two major consequences:
  565.  - the deleted sectors and objects will now be TRULY deleted (no more UNDELETE)
  566.  - their memory and disk usage will be reclaimed
  567.  
  568. 2. Creating a new level
  569.    --------------------
  570.  
  571. You'll have to quit LEVMAP and DFUSE to do this. Go to the DARK directory,
  572. and launch newlevl!.exe . This will create six NEWLEVEL files, with the
  573. extensions .LEV, .O, .INF, .GOL, .PAL, and .CMP . Now, all you have to do is
  574. rename them with a level name of your choice.
  575. It isn't laziness not to have put this in a menu, it's security !
  576.  
  577. Those files contain a minimal level, with useful things already in place.
  578. You will find a complete sector, a start sector with the SPIRIT, and a
  579. 'shopping center' sector containing a selection of useful objects to copy.
  580. The .INF file contains a complete elevator.
  581.  
  582. 3. Quitting LEVMAP
  583.    ---------------
  584.  
  585. Just press the ESC key! If you have any unsaved changes, LEVMAP will ask you
  586. if you want to save them (F2), lose them and quit (ENTER) or return to the
  587. editor (any other key).
  588.  
  589.  
  590.  IX.   GOODIES
  591.        =======
  592.  
  593. These are the features that I couldn't place anywhere else, which doesn't at all
  594. mean that they are not frequently used.
  595.  
  596. 1. DOS Shell
  597.    ---------
  598.  
  599. Just press the 'Z' key. Type 'exit' to return to LEVMAP. This is also a quick
  600. way to force a refresh of the screen. Windows for instance has a bad habit of
  601. trashing my screen when I switch back to LEVMAP from a Windows app.
  602.  
  603. 2. Edit the .INF and .GOL files
  604.    ----------------------------
  605.  
  606. Just press the 'i' key for the .INF, and the 'I' key for the .GOL .
  607.  
  608. 3. Allocated things and free memory
  609.    --------------------------------
  610.  
  611. Pressing Alt + C will show you a statistics display, with the number of
  612. sectors, walls, vertices, objects, textures, and objects by class.
  613.  
  614. It will also show you the 'far core left', which is a only a cute little name
  615. for 'free conventionnal memory'.
  616.  
  617. 4. Consistency checks
  618.    ------------------
  619.  
  620. The 'F10' key will generate a report on level consistency.
  621.  
  622.  * check all the possible adjoin/mirror/walk errors.
  623.  * check that number of VX and number of WL match.                 [NEW]
  624.  * check that Floor is not higher than Ceiling.                    [NEW]
  625.  * show the objects for which a sector could not be found.         [NEW]
  626.  * show if PLAYER start is missing, or if there are more than one. [NEW]
  627.  * check that items: in the .INF is the number of item:            [NEW]
  628.  
  629. You really should use it after complex modifications, it is super and may help
  630. find a lot of 'stupid' mistakes.
  631.  
  632.  
  633. Notes:
  634.  * Errors of the type 'ADJOIN not CORRECT' may be detected if you change the
  635.    adjoins in the .INF and set the 'wrong' value in the .LEV .
  636.  * #VX different from #WL isn't a true 'sector closed' check, but it helps.
  637.    What's more, DF accept open sectors (see SECBASE SC #3).
  638.  * Some objects give an sector error. This occurs when two sectors overlap
  639.    on the same layer. Solution: change the layer!
  640.    If the sectors don't overlap, then the object is completely out of the map
  641.    or not between a floor and a ceiling.
  642.  
  643.  
  644. 5. Automatic texture stitching - altitudes and light distribution
  645.    --------------------------------------------------------------
  646.  
  647. These features all work on ORDERED multiselections which is to say that you have
  648. to create your multiselection in the correct order (remember SECTOR
  649. multiselection for 1 sector converted to WALL multiselection IS in order!).
  650. Here are all the keys:
  651.  
  652.  F5         MID TX horizontal stitching from start
  653.  Alt + F5   TOP TX horizontal stitching from start
  654.  Ctl + F5   BOT TX horizontal stitching from start
  655.  
  656.  F6         MID TX horizontal stitching to end
  657.  Alt + F6   TOP TX horizontal stitching to end
  658.  Ctl + F6   BOT TX horizontal stitching to end
  659.  
  660.  F7         MID TX vertical   stitching
  661.  Alt + F7   TOP TX vertical   stitching
  662.  Ctl + F7   BOT TX vertical   stitching
  663.  
  664.  F8         Distributes Floor and Ceiling altitudes
  665.  Alt + F8   Distributes Floor   altitudes
  666.  Ctl + F8   Distributes Ceiling altitudes
  667.  
  668.  Shf + F8   Distributes Ambient lights
  669.  
  670.  
  671. What does this mean ?
  672.  
  673. Well, texture stitching is a very important part of your level. It is only
  674. aesthetical, but will make all the difference between a good level and a
  675. beautiful level! So, texture stitching is the art (?) of choosing correct
  676. offsets for your textures, so that the walls look continuous.
  677.  
  678. You have to know that Dark Forces will apply the chosen texture on each wall
  679. (this is called 'texture mapping') from the same start point.
  680.  
  681. So, if you look at the lateral walls of a staircase you'll see something like
  682. this:
  683.  
  684.    +------+
  685.    | **** +------+
  686.    |      | **** +------+
  687.    +------+      | **** |
  688.           +------+      |
  689.                  +------+
  690.  
  691. If the texture is uniform, all will be good, but suppose there is a pattern
  692. in it (represented by the ****). This will look awful as the lines of stars
  693. won't match from step to step. The solution to this is to apply offsets to
  694. the textures, so that they will match. This is vertical stitching.
  695.  
  696. Note that this is also the case on simple walls. Suppose the wall is mapped
  697. with a 16 units wide texture, and the geometry of the room asks for the
  698. following walls:
  699.  
  700.   +----------+----+-------------+
  701.   |0123456789|0123|0123456789ABC|
  702.   |          |    |             |
  703.   +----------+----+-------------+
  704.  
  705. Your texture will normally start at 0 at each wall, and again give an awful
  706. look. You must use offsets to make it look like the much better:
  707.  
  708.   +----------+----+-------------+
  709.   |0123456789|ABCD|EF0123456789A|
  710.   |          |    |             |
  711.   +----------+----+-------------+
  712.  
  713. This is horizontal texture stitching. The difference between 'from start' and
  714. 'to end' is that the program will calculate the offsets 'from' the offset of
  715. the first selected wall, OR 'to' the offset of the last selected wall.
  716.  
  717. Try to completely stitch a staircase manually, and you'll understand all this !
  718.  
  719. While we are speaking about stairs, lets explain the altitudes distributions.
  720. Suppose you construct a simple staircase:
  721.  
  722.   +----+----+----+----+----+----+
  723.   | 1  | 2  | 3  | 4  | 5  | 6  |
  724.   |    |    |    |    |    |    |
  725.   +----+----+----+----+----+----+
  726.  
  727. You'll decide that the floors and the ceilings will be distributed between
  728. sector 1 (-3.00, 6.00) and sector 6 (5.00 and 14.00). All you have to do
  729. is to complete those values, multiselect all the sectors, then Distribute!
  730. The program will calculate all the intermediate values.
  731. Please note that you must do this BEFORE vertical texture stitching.
  732.  
  733. Light distribution is exactly the same, to create fading ambient lights.
  734.  
  735.  
  736. A last note on texture stitching:
  737. there is another kind of stitching which isn't automated for now.
  738. Look at this door, which is surrounded by 'beautifiers' sectors.
  739.  
  740.  +-------------+--------+--------------+
  741.  |             |  TOP   |              |
  742.  |             |        |              |
  743.  |    MID      +--------+     MID      |
  744.  |             |        |              |
  745.  |             |        |              |
  746.  |             |        |              |
  747.  +-------------+--------+--------------+
  748.  
  749. The TOP texture above the beautifier sector should be aligned both horizontally
  750. and vertically with the MIDs on each side. You may use the value calculated
  751. for its MID texture x offset, but you'll have to calculate the y offset.
  752. This is quite easy, just make in your mind the TOP texture start at the place
  753. where the MID texture would!
  754.  
  755. 6. Deformations [NEW]
  756.    ------------
  757.  
  758. The 'D' key will open a dialog box where you can encode values for multiple
  759. deformations.
  760. Translate, Scale and Rotate are self explanatory. The reference point for those
  761. last two is as usual (ie the same as for the moves).
  762.  
  763. Note that the values for flip are 0 (DON'T FLIP) or 1 (FLIP).
  764. Flipping works in object and sector modes. Because after the flip the walls and
  765. vertices are completely shuffled, it is near impossible to determine which I
  766. can modify and which I cannot modify, so I'll allow only complete sectors to
  767. be flipped. And even so, it isn't clear how to rearrange the sectors with gaps.
  768.  
  769. Sector flipping is still to be considered BETA, always SAVE before trying it.
  770.  
  771. The dialog box will clear the fields each time you use it, but:
  772.  'P' will get previous values
  773.  'R' will get the reverse of the previous values
  774.      (note that only the inverse of a simple operation will work correctly,
  775.       as LEVMAP will apply the deformations in the same order the second
  776.       time)
  777.  
  778.  
  779. 7. Polygons [NEW]
  780.    --------
  781.  
  782. The 'K' key will open a dialog box where you can encode values for generating
  783. polygons. It will default to the mouse pointer position (nearest grid point if
  784. the grid is on) for the polygon center X and Z values, but you can of course
  785. choose completely different coordinates.
  786. The last two values are simply the radius of the polygon and the number of
  787. sides it will have. As in the Deformations, the 'P' key will restore the
  788. previous values in the dialog.
  789.  
  790. By using the Alt + K key combo, you can create a polygon as a GAP INSIDE a
  791. sector (exactly like Alt + Ins, but prettier).
  792. Important: don't forget to SELECT the sector before.
  793.  
  794. Ctl + K will do both operations, and adjoin all the needed walls. This in effect
  795. makes it a 'Create Subsector' function.
  796.  
  797. Note that from times to times, some adjoins may not be made correctly because
  798. of some obscure rounding problems in the vertices coordinates.
  799. Take the offending vertex, move it, then use the Alt + RIGHT MOUSE trick to put
  800. it back exactly on the other, then readjoin the walls.
  801.  
  802.  
  803.   X.   MISCELLANEOUS REMARKS
  804.        =====================
  805.  
  806. LEVMAP will read the .INF file correctly if comments are used in the following
  807. ways:
  808.  
  809. /*   class: elevator move_floor */
  810.  
  811. /*   class: elevator move_floor
  812. */
  813.  
  814. /*
  815.      class: elevator move_floor */
  816.  
  817. /*
  818.      class: elevator move_floor
  819. */
  820.  
  821. Things will go very badly if you use comments embedded in a line:
  822.  
  823.      class: elevator /* move_ceiling */ move_floor    [WRONG!]
  824.